﻿
using System.Drawing;

namespace CellularAutomation.Core
{
	/// <summary>
	/// Структура координат клетки
	/// </summary>
	public struct GridPoint
	{
		private readonly int _x;

		private readonly int _y;

		/// <summary>
		/// Конструктор структуры
		/// </summary>
		/// <param name="x">Координата X</param>
		/// <param name="y">Координата Y</param>
		public GridPoint(int x, int y)
		{
			this._x = x;
			this._y = y;
		}

		/// <summary>
		/// Метод возвращает сконвертированый в <see cref="Point"/> объект
		/// </summary>
		/// <returns></returns>
		public Point ToPoint(){return new Point(this._x, this._y);}

		/// <summary>
		/// Координата X
		/// </summary>
		public int X { get { return this._x; } }

		/// <summary>
		/// Координата Y
		/// </summary>
		public int Y { get { return this._y; } }
	}
}
